package com.bw.heishou.Adapter;

import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class MyViewPageAdapter extends FragmentPagerAdapter {
    private List<Fragment> list;

    public MyViewPageAdapter( FragmentManager fm, int behavior,List<Fragment> list) {
        super(fm, behavior);
        this.list=list;
    }


    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public void destroyItem( ViewGroup container, int position,  Object object) {
//        super.destroyItem(container, position, object);
    }

}
